package mud.support;

import groovy.lang.Binding;
import groovy.lang.GroovyShell;

public class ScriptLoader {
    public String execute(String script,Binding data)
    {
        try {
            GroovyShell shell = new GroovyShell(data);
            return shell.evaluate(script).toString();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        return null;
    }
}
